import { createFromIconfontCN } from "@ant-design/icons";
import type { FC } from "react";
import IconModal from "./components/IconModal";
import { DIYIconList } from "./components/data";
const IconFont = createFromIconfontCN({
	scriptUrl: ["//at.alicdn.com/t/c/font_4274466_hrbskijnvks.js"]
	// scriptUrl: ['/fontIcon.js'],
});

const SelectIcon: FC<any> = () => {
	return (
		<>
			<IconModal
				title="選擇圖標"
				searchText="搜索圖標"
				open={false}
				onChange={(key: string) => {
					console.log("key", key);
				}}
				cancel={(open: boolean) => {
					console.log(open);
				}}
				extendRender={{
					IconFont: IconFont,
					// @ts-ignore
					options: [{ label: "自定义", data: DIYIconList, key: "iconFont" }]
				}}
			/>
		</>
	);
};

export default SelectIcon;
